home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / faq-s.zip / VIEWANSI.PAS < prev    next >
Pascal/Delphi Source File  |  1990-09-01  |  1KB  |  56 lines

  1. {$R-,S-,I-,D-,F+,V-,B-,N-,L+,O+ }
  2. {$M 65500,0,0 }
  3.  
  4. unit viewansi;
  5.  
  6. interface
  7.  
  8. uses crt,dos,
  9.      gentypes,configrt,modem,statret,gensubs,subs1,windows,subs2;
  10.  
  11. procedure viewansiscreens;
  12.  
  13. implementation
  14.  
  15. procedure viewansiscreens;
  16.  
  17. var bobway:integer;
  18.     p:lstr;
  19.     asciii:boolean;
  20. begin
  21.  if numwelcomes<1 then begin
  22.   writeln (^M^S'There are no Ansi Screens currently available'^R^M);
  23.   exit;
  24.  end else
  25.  repeat
  26.   asciii:=false;
  27.   p[0]:=chr(0);
  28.   p:='';
  29.   if ansi then write (direct,#27+'[2J') else write (direct,^L);
  30.   writehdr ('Ansi Welcome Screens');
  31.   write (^B'Ansi Screens: ['^S,numwelcomes,^R']'^M);
  32.   if exist (textfiledir+'Welcome.ASC') then writeln ('Ascii Screen: ['^S'1'^R']'^M);
  33.   p:='Enter Choice [#1-'+strr(numwelcomes)+'] ';
  34.   if asciii then p:=p+'[A/Ascii] ';
  35.   p:=p+'[Q/Quit]: ';
  36.   write (^B+p);
  37.   writestr ('*');
  38.   bobway:=valu(input);
  39.   if upcase(input[1])='A' then begin
  40.    printfile (textfiledir+'WELCOME.ASC');
  41.    writestr ('Press ['^R'Return'^P'] to continue. *')
  42.   end;
  43.   if valu(input) in [1..numwelcomes] then begin
  44.    if ansi then begin
  45.     if bobway>numwelcomes then
  46.     writeln (^M'There are only '+strr(numwelcomes)+' screens!') else
  47.     printfile (textfiledir+'Welcome.'+strr(bobway));
  48.     movexy (1,urec.displaylen);
  49.     writestr ('Press ['^S'Return'^P'] to continue. *')
  50.    end
  51.   end;
  52.  until upcase(input[1])='Q';
  53.  movexy (1,11)
  54. end;
  55. begin
  56. end.